package com.goodwill.androidtest.adapter;


import android.content.Context;

import com.chad.library.adapter.base.BaseViewHolder;
import com.chad.library.adapter.base.MultipleItemRvAdapter;
import com.goodwill.androidtest.Demo;
import com.goodwill.androidtest.TimerControlerWidgetProvider;


public class TestRvAdapter extends MultipleItemRvAdapter<Demo, BaseViewHolder> {
    private TimerControlerWidgetProvider mTimerWidgetProvider;

    public TestRvAdapter(Context context) {
        super(null);
        mContext = context;
//        editTextWidgetProvider = new EditTextWidgetProvider();
//        textWidgetProvider = new TextWidgetProvider();
//        editComboxWidgetProvider = new EditComboxWidgetProvider(mContext);
//        selectWidgetProvider = new SelectWidgetProvider(mContext);
//        mCheckboxArgumentProvider = new CheckboxArgumentProvider(mContext);
        mTimerWidgetProvider = new TimerControlerWidgetProvider();

//        initListeners();

        //必须在构造函数的最后进行调用
        finishInitialize();
    }

    @Override
    protected int getViewType(Demo demo) {
        return demo.getType();
    }

    @Override
    public void registerItemProvider() {
        mProviderDelegate.registerProvider(mTimerWidgetProvider);
    }
}
